﻿namespace SLClient.ServiceAPI
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.Serialization;
    using System.Threading;

    [DebuggerStepThrough, DataContract(Name="ViwLoginLog", Namespace="http://www.slclient.com"), GeneratedCode("System.Runtime.Serialization", "4.0.0.0")]
    public class ViwLoginLog : INotifyPropertyChanged
    {
        private string AddressField;
        private string IpAddressField;
        private int LogIdField;
        private DateTime LoginTimeField;
        private PropertyChangedEventHandler _PropertyChanged;
        private string UserAccountField;
        private int? UserTypeField;

        public event PropertyChangedEventHandler PropertyChanged
        {
            add
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Combine(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
            remove
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Remove(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
        }

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember]
        public string Address
        {
            get
            {
                return this.AddressField;
            }
            set
            {
                if (!object.ReferenceEquals(this.AddressField, value))
                {
                    this.AddressField = value;
                    this.RaisePropertyChanged("Address");
                }
            }
        }

        [DataMember]
        public string IpAddress
        {
            get
            {
                return this.IpAddressField;
            }
            set
            {
                if (!object.ReferenceEquals(this.IpAddressField, value))
                {
                    this.IpAddressField = value;
                    this.RaisePropertyChanged("IpAddress");
                }
            }
        }

        [DataMember]
        public int LogId
        {
            get
            {
                return this.LogIdField;
            }
            set
            {
                if (!this.LogIdField.Equals(value))
                {
                    this.LogIdField = value;
                    this.RaisePropertyChanged("LogId");
                }
            }
        }

        [DataMember]
        public DateTime LoginTime
        {
            get
            {
                return this.LoginTimeField;
            }
            set
            {
                if (!this.LoginTimeField.Equals(value))
                {
                    this.LoginTimeField = value;
                    this.RaisePropertyChanged("LoginTime");
                }
            }
        }

        [DataMember]
        public string UserAccount
        {
            get
            {
                return this.UserAccountField;
            }
            set
            {
                if (!object.ReferenceEquals(this.UserAccountField, value))
                {
                    this.UserAccountField = value;
                    this.RaisePropertyChanged("UserAccount");
                }
            }
        }

        [DataMember]
        public int? UserType
        {
            get
            {
                return this.UserTypeField;
            }
            set
            {
                if (!this.UserTypeField.Equals(value))
                {
                    this.UserTypeField = value;
                    this.RaisePropertyChanged("UserType");
                }
            }
        }
    }
}

